#define G9B_COMPRESSION_BITBUST 	1

typedef unsigned char  BYTE;
typedef unsigned short WORD;
typedef unsigned long  DWORD;
typedef long           LONG;

typedef void*		   HANDLE;

#pragma pack(1)

// Copied from windows
typedef struct tagRGBQUAD {
        BYTE    rgbBlue;
        BYTE    rgbGreen;
        BYTE    rgbRed;
        BYTE    rgbReserved;
} RGBQUAD;
 
typedef struct tagBITMAPFILEHEADER {
        WORD    bfType;
        DWORD   bfSize;
        WORD    bfReserved1;
        WORD    bfReserved2;
        DWORD   bfOffBits;
} BITMAPFILEHEADER;

typedef struct tagBITMAPINFOHEADER{
        DWORD      biSize;
        LONG       biWidth;
        LONG       biHeight;
        WORD       biPlanes;
        WORD       biBitCount;
        DWORD      biCompression;
        DWORD      biSizeImage;
        LONG       biXPelsPerMeter;
        LONG       biYPelsPerMeter;
        DWORD      biClrUsed;
        DWORD      biClrImportant;
} BITMAPINFOHEADER;


typedef struct 
{
	BYTE bitDepth;    // 2,4,8 or 16 bit
	BYTE colorType;   // 0=64 color palette mode,64=256 color fixed ,128=YJK and 192=YUV mode
	BYTE nrColors;	  // Number of colors in palette mode
	WORD width;		  // Width
	WORD height;      // Height
	BYTE compression; // 0 = no compression, other value = compression used
	BYTE dataSize[3]; // 24 bit data size	
}G9B_INFO_HEADER;


typedef struct 
{
	char			g9bID[3];
	WORD			headerSize;
	G9B_INFO_HEADER info;
}G9B_HEADER;

#pragma pack()